//
//  ChatModel.h
//  WChat
//
//  Created by lw on 2018/7/31.
//  Copyright © 2018年 mjsfax. All rights reserved.
//

#import <Foundation/Foundation.h>
/*
 eMessageBodyType_Text = 1,
 eMessageBodyType_Image,
 eMessageBodyType_Video,
 eMessageBodyType_Location,
 eMessageBodyType_Voice,
 eMessageBodyType_File,
 eMessageBodyType_Command*/
typedef enum : NSUInteger {
    ChatTypeText = eMessageBodyType_Text,
    ChatTypeImage,
    ChatTypeVideo,
    ChatTypeVoice = eMessageBodyType_Voice,
} ChatType;

@interface ChatModel : NSObject

@property (strong, nonatomic) EMMessage *message;
@property (strong, nonatomic) NSString *timeString;
@property (assign, nonatomic, getter=isMe) BOOL me;
@property (assign, nonatomic) CGFloat cellHeight;
@property (assign, nonatomic) ChatType chatType;

///文本消息

@property (strong, nonatomic) NSString *contentText;

///图片消息
@property (strong, nonatomic) NSString *localImageUrl; //大图
@property (strong, nonatomic) NSString *remoteImageUrl;
@property (strong, nonatomic) NSString *localThumbnailUrl; //预览图
@property (strong, nonatomic) NSString *remoteThumbnailUrl;
@property (assign, nonatomic, getter=isVertical) BOOL vertical;//是否横预览
@property (assign, nonatomic) CGRect imageRect;

///语音消息
@property (assign, nonatomic) NSInteger duration;
@property (copy, nonatomic) NSString *voicePath;

@end
